/***************************************************************************
 *   Copyright (C) 2009 by Geoffrey McRae   *
 *   geoff@spacevs.com   *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/
#ifndef _H_ARRAY_
#define _H_ARRAY_

typedef struct array array_t;

array_t* array_new();
void array_free(array_t *a);
inline void array_push(array_t *a, void* data);
inline void* array_pop(array_t *a);
inline void array_unshift(array_t *a, void *data);
inline void* array_shift(array_t *a);
inline void* array_get(array_t *a, unsigned int index);
inline void array_del(array_t *a, unsigned int index, unsigned int count);
inline void array_ins(array_t *a, unsigned int index, void* data);
inline void array_empty(array_t *a);
inline unsigned int array_count(array_t *a);

#endif
